package com.whlilong.jxc.app;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;

public class ClientWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

	    public ClientWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	        super(configurer);
	    }


		public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
	        return new ClientActionBarAdvisor(configurer);
	    }
	    
	    public void preWindowOpen() {
	        IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
//	        configurer.setInitialSize(new Point(1024, 768));
	        configurer.setShowMenuBar(false);
	        configurer.setShowCoolBar(false);
	        configurer.setShowStatusLine(false);
	        configurer.setShellStyle(SWT.RESIZE);
	        configurer.setTitle("立隆商务信息管理系统");
	    }
	    public void postWindowCreate(){
	    	super.postWindowCreate();
	    	//设置打开时最大化窗口
	    	getWindowConfigurer().getWindow().getShell().setMaximized(true);
//	    	getWindowConfigurer().getWindow().getShell().setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
	    	
	    }
	}

